package com.hyq.adapter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @ClassName: OuterUserInfo 
* @Description: 外包公司与甲方公司人力管理系统对接-适配器
* @author Janus
 */
public class OuterUserInfo implements UserInfo {
	
	private OuterUserBase userBase= null;
	
	private OuterUserHome userHome=null;
	
	//临时存储用户信息
	private Map<String,String> userH=null;
	//临时存储用户地址
	private Map<String,String> userM=null;
	
	public  OuterUserInfo(OuterUserBase _userBase,OuterUserHome _userHome) {
		this.userBase=_userBase;
		this.userHome=_userHome;
		this.userH=_userBase.getUserBase();
		this.userM=_userHome.getUserHome();
	}
	/*
	 * 获取用户姓名
	 */
	@Override
	public String getName() {
		return this.userH.get("name");
	}
	/*
	 * 获取用户性别
	 */
	@Override
	public String getSex() {
		return this.userH.get("sex");
	}
	/*
	 * 获取用户地址
	 */
	@Override
	public List<String> getAddress() {
		List<String> list=new ArrayList<String>();
		list.add(this.userM.get("address"));
		list.add(this.userM.get("address1"));
		return list;
	}
	
	

}
